import numpy as np

x = [[1, 2, 3], [4, 5, 6]]
a = np.asarray(x)
print(a)
print(a.shape)

x = (1, 2, 3)
a = np.asarray(x)
print(a)

x = [(1, 2, 3), (4, 5)]
a = np.asarray(x, dtype=object)
print(a)

x = [1, 2, 3]
a = np.asarray(x, dtype=float)
print(a)

s = b'Hello World'
a = np.frombuffer(s, dtype='S1')
print(a)

l = range(5)
it = iter(l)
a = np.fromiter(it, dtype=float)
print(a)
